home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
X11
/
xsw
/
include
/
sepwin.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-07-07
|
12KB
|
346 lines
/*
* @(#) sepwin.h 12.1 95/07/07 SCOINC
*/
/***************************************************************************
*
* Copyright (c) 1990-1993 The Santa Cruz Operation, Inc.
*
* All rights reserved. No part of this program or publication may be
* reproduced, transmitted, transcribed, stored in a retrieval system,
* or translated into any language or computer language, in any form or
* by any means, electronic, mechanical, magnetic, optical, chemical,
* biological, or otherwise, without the prior written permission of:
*
* The Santa Cruz Operation , Inc. (408) 425-7222
* 400 Encinal St., Santa Cruz, California 95060 USA
*
**************************************************************************/
/*
* SCCS Stuff
*
* @(#) sepwin.h 12.1 95/07/07 SCOINC
*
* S001, 21-Sep-93, rickra
* Added some stuff....
*
* S000, 27-May-93, rickra
* Initial check in.
*/
typedef struct ClientStruct
{
char *classname;
} ClientStuff;
static ClientStuff Client_decl[] =
{
{"xsw_cpu_"},
{"xsw_wait_"},
{"xsw_cache_"},
{"xsw_other_"},
{"xsw_ps_cpu_"},
{"xsw_ps_io_"},
{"xsw_ps_mem_"},
{"xsw_streams_"},
{"xsw_nfsstat_"},
{"xsw_sysinfo_"},
{"xsw_vbt_"},
{"xsw_dev_stats_"},
{"xsw_mem_"},
{"xsw_disk_space_"},
};
extern struct NetworkXswStruct *current_server;
extern struct NetworkXswStruct *toggle_button_current_server;
#define LEFT_SIDE_OFFSET 0
#define RIGHT_SIDE_OFFSET 1
#define BUTTON_OFF 0
#define BUTTON_ON 1
/*
* Button types....
*/
#define SORT_BUTTON 0 /* Left justified.... */
#define CUM_CUR_BUTTON 1 /* CUM/CUR.... */
#define ASCEND_DESCEND_BUTTON 2 /* A/D.... */
#define PERCENT_OTHER_BUTTON 3 /* %/T/M.... */
#define SCREEN_SWITCH_BUTTON 4 /* */
#define FILTER_BUTTON 5 /* To filter something....*/
#define SHOW_NFS_BUTTON 6 /* To filter something....*/
#define SHOW_TOTAL_BUTTON 7 /* To filter something....*/
typedef struct _ps_menu_struct
{
int screen_number;
char *name; /* name of the button */
int state; /* button on or off */
int type; /* button type */
int offset_side; /* offset side: left/right */
int offset; /* offset from attachment */
void (*func) (); /* Callback to be invoked */
} ps_menu_struct;
typedef struct _multi_screen_window_struct
{
char *default_title;
char *default_pulldown_label;
} multi_screen_window_struct;
typedef struct _option_window_struct
{
int type; /* 1 == toggle */
/* 0 == mult-view */
int number_views;
char *default_pulldown_label;
char *default_label;
} option_window_struct;
typedef struct ps_button_callback_struct
{
struct NetworkXswStruct *server_pointer;
int sort_mode; /* toggle button number..... */
int button_num; /* PS button... BUTTON_ps_cpu */
ps_menu_struct *ps_menu;
multi_screen_window_struct *ps_screen;
int ps_screen_number;
int ps_menu_index;
} PS_BUTTON_CALLBACK_STRUCT;
typedef struct window_button_callback_struct
{
struct NetworkXswStruct *server_pointer;
int sort_mode; /* toggle button number..... */
int button_num; /* PS button... BUTTON_ps_cpu */
ps_menu_struct *ps_menu;
multi_screen_window_struct *ps_screen;
int ps_screen_number;
int ps_menu_index;
int type;
int dynamic_window_index;
} WINDOW_BUTTON_CALLBACK_STRUCT;
typedef struct scrolled_ps_callback_struct
{
struct NetworkXswStruct *server_pointer;
ps_menu_struct *ps_menu;
int button_number;
int number_of_buttons;
int number_of_screens;
} SCROLLED_PS_CALLBACK_STRUCT;
void
expose_callback (Widget widget,
struct expose_callback_struct *client_data,
XmDrawingAreaCallbackStruct * call_data);
void
input_callback (Widget widget,
struct NetworkXswStruct *client_data,
XmDrawingAreaCallbackStruct * call_data);
void
ps_button_callback (Widget my_widget,
struct ps_button_callback_struct *ps_button_struct,
XmToggleButtonCallbackStruct * cbs);
/*
* Begin PS CPU structures....
*/
static ps_menu_struct ps_toggle_button_data[] =
{
{0,"S", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 0, ps_button_callback},
{0,"USER", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 6, ps_button_callback},
{0,"PID", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 13, ps_button_callback},
{0,"CPU", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 17, ps_button_callback},
{0,"PRI", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 21, ps_button_callback},
{0,"NI", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 25, ps_button_callback},
{0,"UCPU", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 30, ps_button_callback},
{0,"SCPU", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 37, ps_button_callback},
{0,"U+S", BUTTON_ON, SORT_BUTTON, LEFT_SIDE_OFFSET, 45, ps_button_callback},
{0,"SIZE", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 49, ps_button_callback},
{0,"TTY", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 54, ps_button_callback},
{0,"CMD", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 58, ps_button_callback}
/*
{0,"CUR", BUTTON_ON, CUM_CUR_BUTTON, RIGHT_SIDE_OFFSET, 0, ps_button_callback},
{0,"D",BUTTON_ON,ASCEND_DESCEND_BUTTON,RIGHT_SIDE_OFFSET,4, ps_button_callback},
{0,"%",BUTTON_ON,PERCENT_OTHER_BUTTON, RIGHT_SIDE_OFFSET, 7, ps_button_callback}
*/
};
/*
* Begin PS I/O structures....
*/
static ps_menu_struct ps_io_toggle_button_data[] =
{
{0,"USER", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 0, ps_button_callback},
{0,"PID", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 13, ps_button_callback},
{0,"SWAP", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 19, ps_button_callback},
{0,"CHAR", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 32, ps_button_callback},
{0,"READ", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 39, ps_button_callback},
{0,"WRITE", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 45, ps_button_callback},
{0,"TOTAL", BUTTON_ON, SORT_BUTTON, LEFT_SIDE_OFFSET, 54, ps_button_callback},
{0,"CMD", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 60, ps_button_callback}
/*
{0,"CUR", BUTTON_ON, CUM_CUR_BUTTON, RIGHT_SIDE_OFFSET, 0, ps_button_callback},
{0,"D",BUTTON_ON,ASCEND_DESCEND_BUTTON,RIGHT_SIDE_OFFSET,4, ps_button_callback},
{0,"%",BUTTON_ON,PERCENT_OTHER_BUTTON,RIGHT_SIDE_OFFSET,7, ps_button_callback}
*/
};
/*
* Begin PS MEM structures....
*/
static ps_menu_struct ps_mem_toggle_button_data[] =
{
{0,"USER", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 4, ps_button_callback},
{0,"PID", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 11, ps_button_callback},
{0,"VSIZE", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 17, ps_button_callback},
{0,"SHRD", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 25, ps_button_callback},
{0,"PRIV", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 31, ps_button_callback},
{0,"WTD", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 37, ps_button_callback},
{0,"TOTAL", BUTTON_ON, SORT_BUTTON, LEFT_SIDE_OFFSET, 42, ps_button_callback},
{0,"CMD", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 49, ps_button_callback},
{1,"USER", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 4, ps_button_callback},
{1,"PID", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 11, ps_button_callback},
{1,"VSIZE", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 17, ps_button_callback},
{1,"NONE", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 25, ps_button_callback},
{1,"SWAP", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 31, ps_button_callback},
{1,"FILE", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 37, ps_button_callback},
{1,"LSTFILE",BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 42, ps_button_callback},
{1,"TOTAL", BUTTON_ON, SORT_BUTTON, LEFT_SIDE_OFFSET, 51, ps_button_callback},
{1,"CMD", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 58, ps_button_callback},
{2,"USER", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 4, ps_button_callback},
{2,"PID", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 11, ps_button_callback},
{2,"VSIZE", BUTTON_ON, SORT_BUTTON, LEFT_SIDE_OFFSET, 17, ps_button_callback},
{2,"NONE", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 25, ps_button_callback},
{2,"SWAP", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 31, ps_button_callback},
{2,"FILE", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 37, ps_button_callback},
{2,"LSTFILE",BUTTON_OFF,SORT_BUTTON,LEFT_SIDE_OFFSET, 42, ps_button_callback},
{2,"ZERO", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 52, ps_button_callback},
{2,"FILL", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 59, ps_button_callback},
#ifndef XSW32v5
{2,"IOMAP", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 65, ps_button_callback},
{2,"WINDOW", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 71, ps_button_callback},
#else
{2,"PROC", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 65, ps_button_callback},
#endif
{2,"CMD", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 79, ps_button_callback},
{3,"USER", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 4, ps_button_callback},
{3,"PID", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 11, ps_button_callback},
{3,"VSIZE", BUTTON_ON, SORT_BUTTON, LEFT_SIDE_OFFSET, 17, ps_button_callback},
{3,"SWAP", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 25, ps_button_callback},
{3,"FILE", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 31, ps_button_callback},
{3,"LSTFILE",BUTTON_OFF,SORT_BUTTON, LEFT_SIDE_OFFSET, 37, ps_button_callback},
{3,"CMD", BUTTON_OFF, SORT_BUTTON, LEFT_SIDE_OFFSET, 46, ps_button_callback}
};
/*
* Begin Disk Space structures....
*/
static ps_menu_struct disk_space_toggle_button_data[] =
{
{0,"TOTAL",BUTTON_ON,SORT_BUTTON,LEFT_SIDE_OFFSET,3, ps_button_callback},
{0,"USED",BUTTON_OFF,SORT_BUTTON,LEFT_SIDE_OFFSET,14, ps_button_callback},
{0,"FREE",BUTTON_OFF,SORT_BUTTON,LEFT_SIDE_OFFSET,24, ps_button_callback},
{0,"% USED",BUTTON_OFF,SORT_BUTTON,LEFT_SIDE_OFFSET,33,ps_button_callback},
{0,"% FREE",BUTTON_OFF,SORT_BUTTON,LEFT_SIDE_OFFSET,43,ps_button_callback},
{0,"MOUNT PT. & FILESYSTEM",BUTTON_OFF,SORT_BUTTON,LEFT_SIDE_OFFSET,50,ps_button_callback},
{1,"BLOCKS",BUTTON_ON,SORT_BUTTON,LEFT_SIDE_OFFSET,2, ps_button_callback},
{1,"USED",BUTTON_OFF,SORT_BUTTON,LEFT_SIDE_OFFSET,14, ps_button_callback},
{1,"FREE",BUTTON_OFF,SORT_BUTTON,LEFT_SIDE_OFFSET,24, ps_button_callback},
{1,"% USED",BUTTON_OFF,SORT_BUTTON,LEFT_SIDE_OFFSET,33,ps_button_callback},
{1,"% FREE",BUTTON_OFF,SORT_BUTTON,LEFT_SIDE_OFFSET,43,ps_button_callback},
{1,"MOUNT PT. & FILESYSTEM ",BUTTON_OFF,SORT_BUTTON,LEFT_SIDE_OFFSET,50,ps_button_callback},
{2,"ITOTAL",BUTTON_ON,SORT_BUTTON,LEFT_SIDE_OFFSET,2, ps_button_callback},
{2,"IUSED",BUTTON_OFF,SORT_BUTTON,LEFT_SIDE_OFFSET,13, ps_button_callback},
{2,"IFREE",BUTTON_OFF,SORT_BUTTON,LEFT_SIDE_OFFSET,23, ps_button_callback},
{2,"% IUSED",BUTTON_OFF,SORT_BUTTON,LEFT_SIDE_OFFSET,32,ps_button_callback},
{2,"% IFREE",BUTTON_OFF,SORT_BUTTON,LEFT_SIDE_OFFSET,42,ps_button_callback},
{2,"MOUNT PT. & FILESYSTEM ",BUTTON_OFF,SORT_BUTTON,LEFT_SIDE_OFFSET,50,ps_button_callback}
};
static multi_screen_window_struct ps_mem_screens[] =
{
{"Core Storage Only: Private & Shared", "Core Storage Only: Private & Shared"},
{"Core Storage Only","Core Storage Only"},
{"All Storage","All Storage"},
{"Secondary Storage Only","Secondary Storage Only"}
};
static multi_screen_window_struct ps_cpu_screens[] =
{
{"PS CPU UTILIZATION: User & System","CPU"}
};
static multi_screen_window_struct ps_io_screens[] =
{
{"PS IO UTILIZATION:","IO"}
};
static multi_screen_window_struct disk_space_screens[] =
{
{"DISK SPACE ALLOCATION IN MB","MB SPACE"},
{"BLOCK ALLOCATION","BLOCKS"},
{"INODE ALLOCATION","INODES"}
};
static option_window_struct disk_space_options[] =
{
{0,0,"TEST1","TEST1"},
{0,0,"TEST2","TEST2"},
{0,0,"TEST3","TEST3"},
{0,0,"TEST4","TEST4"},
{0,0,"TEST5","TEST5"},
{0,0,"TEST6","TEST6"},
{0,0,"TEST7","TEST7"}
/*
{0,3,"VIEW",NULL},
{1,0,"MB SPACE","DISK SPACE ALLOCATION IN MB"},
{1,0,"BLOCKS","BLOCK ALLOCATION"},
{1,0,"INODES","INODE ALLOCATION"},
{0,0,"SHOW NFS",NULL},
{0,0,"SHOW TOTAL",NULL}
*/
};